--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Commit 7da53ad6a7860b1ea2b99195be2f9fa208a06e62
Parents : 2c0d249
Author : Mark Qvist <mark@unsigned.io>
Date : 2022-10-25T16:23:47+02:00
Added identity hash display to preferences screen
Changes
2 files changed, 25 insertions(+), 8 deletions(-)
Diff
diff --git a/sbapp/main.py b/sbapp/main.py
index bd613a92..fb379e80 100644
--- a/sbapp/main.py
+++ b/sbapp/main.py
@@ -958,6 +958,7 @@ class SidebandApp(MDApp):
self.sideband.save_configuration()
self.root.ids.settings_lxmf_address.text = RNS.hexrep(self.sideband.lxmf_destination.hash, delimit=False)
+ self.root.ids.settings_identity_hash.text = RNS.hexrep(self.sideband.lxmf_destination.identity.hash, delimit=False)
self.root.ids.settings_display_name.text = self.sideband.config["display_name"]
self.root.ids.settings_display_name.bind(on_text_validate=save_disp_name)
@@ -972,7 +973,7 @@ class SidebandApp(MDApp):
self.root.ids.settings_propagation_node_address.bind(on_text_validate=save_prop_addr)
self.root.ids.settings_propagation_node_address.bind(focus=save_prop_addr)
- if android_api_version >= 26:
+ if not RNS.vendor.platformutils.is_android() or android_api_version >= 26:
self.root.ids.settings_notifications_on.active = self.sideband.config["notifications_on"]
self.root.ids.settings_notifications_on.bind(active=save_notifications_on)
else:
diff --git a/sbapp/ui/layouts.py b/sbapp/ui/layouts.py
index cb59cde4..15c3587d 100644
--- a/sbapp/ui/layouts.py
+++ b/sbapp/ui/layouts.py
@@ -984,26 +984,42 @@ MDNavigationLayout:
font_size: dp(24)
MDTextField:
- id: settings_lxmf_address
- hint_text: "Your LXMF Address"
- text: ""
+ id: settings_propagation_node_address
+ hint_text: "LXMF Propagation Node"
disabled: False
+ text: ""
max_text_length: 32
font_size: dp(24)
MDTextField:
- id: settings_propagation_node_address
- hint_text: "LXMF Propagation Node"
+ id: settings_home_node_address
+ hint_text: "Nomad Network Home Node"
disabled: False
text: ""
max_text_length: 32
font_size: dp(24)
+ MDLabel:
+ text: ""
+ font_style: "H6"
+
+ MDLabel:
+ text: "Address & Identity"
+ font_style: "H6"
+
MDTextField:
- id: settings_home_node_address
- hint_text: "Nomad Network Home Node"
+ id: settings_lxmf_address
+ hint_text: "Your LXMF Address"
+ text: ""
disabled: False
+ max_text_length: 32
+ font_size: dp(24)
+
+ MDTextField:
+ id: settings_identity_hash
+ hint_text: "Your Identity Hash"
text: ""
+ disabled: False
max_text_length: 32
font_size: dp(24)
──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────